<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>当指针移动到元素上方时，改变其颜色；当指针移出文本后，会再次改变其颜色</title>
</head>

<body>
    <h1 onmouseover="style.color='red'" onmouseout="style.color='black'">将鼠标移至文本上</h1>
</body>

</html>